// vue.config.js
const path = require('path');
const { defineConfig } = require('@vue/cli-service')
module.exports =
 defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    open: true,
    client: {
      overlay: false
    },
    proxy: {
      "/dev-api": {
        target: "https://doujia-api.luerdog.com/", // 这里后台的地址模拟的;应该填写你们真实的后台接口
        changeOrigin: true, // 允许跨域
        secure: false,
        pathRewrite: { '^/dev-api': 'https://doujia-api.luerdog.com/' }, // 注意这里修改了 pathRewrite 的匹配路径
        headers: {
          'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
          'Host': 'doujia-api.luerdog.com'
        }
      }
    },
  },
})